<template>
  <div>
    LoanInput
    <g-form-creator ref="fd" :config="loganInputConfig" @submit="doSubmit">
      <template #default="{ innerValue }">
        <el-button type="primary" @click="showData">{{ innerValue }}</el-button>
      </template>
    </g-form-creator>
  </div>
</template>

<script>
import loganInputConfig from './pageConfig'
export default {
  name: 'LoanInput',
  data () {
    return {
      loganInputConfig
    }
  },
  methods: {
    doSubmit (data) {
      console.log('doSubmit', data)
    },
    showData () {
      const data = this.$refs.fd.getData()
      data.username = 'minghe'
      console.log('showData', data)
    }
  }
}
</script>
